import {_decorator, Component, Node, NodeEventType, EventMouse} from 'cc';
import {BirdController} from "db://assets/scripts/flappyBird/BirdController";

const {ccclass, property} = _decorator;

@ccclass('MainController')
export class MainController extends Component {
    /**
     * 小鸟的脚本
     */
    @property(BirdController)
    birdController: BirdController = null;

    start() {
        this.node.on(NodeEventType.MOUSE_DOWN, (event: EventMouse) => {
            this.birdController.fly();
        });
    }

    update(deltaTime: number) {

    }
}

